package io.gitee.zhucan123.core.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author: zhuCan
 * @date: 17:28
 * @description: springMVC 接受前端参数 全局处理
 */
@Configuration
public class ConverterConfigurer implements WebMvcConfigurer {

  @Override
  public void addFormatters(FormatterRegistry registry) {
    registry.addConverterFactory(new EnumConverterFactory());
    registry.addFormatter(new LocalConverter());
    registry.addConverter(new LocalDateConverter());

  }

}
